describe('practice-1-6', function () {

    it("根据牛顿迭代法求方程的根", function () {
        var root_x = roots_newton_solve_equation(2,-4,3,-6);
        console.info('root_x:'+root_x);
        expect(root_x.toFixed(2)).toBe("2.00");

        var root_x1 = roots_newton_solve_equation(1,2,3,4);
        console.info('root_x1:'+root_x1);
        expect(root_x1.toFixed(2)).toBe("-1.65");

        var root_x2 = roots_newton_solve_equation(2,5,6,3);
        console.info('root_x2:'+root_x2);
        expect(root_x2.toFixed(2)).toBe("-1.00");

        var root_x3 = roots_newton_solve_equation(4,2,3,8);
        console.info('root_x3:'+root_x3);
        expect(root_x3.toFixed(2)).toBe("-1.22");

        var root_x4 = roots_newton_solve_equation(4,-2,3,-8);
        console.info('root_x4:'+root_x4);
        expect(root_x4.toFixed(2)).toBe("1.22");

        var root_x5 = roots_newton_solve_equation(2,-5,3,-3);
        console.info('root_x5:'+root_x5);
        expect(root_x5.toFixed(2)).toBe("2.13");
    });
});